<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MQTT C Client Libraries Internals: MQTTClient.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MQTT C Client Libraries Internals
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">MQTTClient.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Synchronous API implementation.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;sys/time.h&gt;</code><br />
<code>#include &quot;MQTTClient.h&quot;</code><br />
<code>#include &quot;MQTTPersistence.h&quot;</code><br />
<code>#include &quot;utf-8.h&quot;</code><br />
<code>#include &quot;MQTTProtocol.h&quot;</code><br />
<code>#include &quot;MQTTProtocolOut.h&quot;</code><br />
<code>#include &quot;Thread.h&quot;</code><br />
<code>#include &quot;SocketBuffer.h&quot;</code><br />
<code>#include &quot;StackTrace.h&quot;</code><br />
<code>#include &quot;Heap.h&quot;</code><br />
<code>#include &quot;OsWrapper.h&quot;</code><br />
<code>#include &quot;VersionInfo.h&quot;</code><br />
<code>#include &quot;WebSocket.h&quot;</code><br />
<code>#include &quot;Proxy.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for MQTTClient.c:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c__incl.png" border="0" usemap="#aMQTTClient_8c" alt=""/></div>
<map name="aMQTTClient_8c" id="aMQTTClient_8c">
<area shape="rect" title="Synchronous API implementation." alt="" coords="121,5,224,32"/>
<area shape="rect" title=" " alt="" coords="5,80,68,107"/>
<area shape="rect" title=" " alt="" coords="93,80,157,107"/>
<area shape="rect" title=" " alt="" coords="181,80,263,107"/>
<area shape="rect" title=" " alt="" coords="287,80,386,107"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structconlost__sync__data.html">conlost_sync_data</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structqEntry.html">qEntry</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClients.html">MQTTClients</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structprops__rc__parms.html">props_rc_parms</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a62b7ecff86a928a545160725cc9e2430"><td class="memItemLeft" align="right" valign="top"><a id="a62b7ecff86a928a545160725cc9e2430"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_SSL</b>&#160;&#160;&#160;&quot;ssl://&quot;</td></tr>
<tr class="separator:a62b7ecff86a928a545160725cc9e2430"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0a2eaec459e41189e500536109bbe85"><td class="memItemLeft" align="right" valign="top"><a id="ab0a2eaec459e41189e500536109bbe85"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_MQTTS</b>&#160;&#160;&#160;&quot;mqtts://&quot;</td></tr>
<tr class="separator:ab0a2eaec459e41189e500536109bbe85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff8054f166c9eb81b4e7695bc7f1ec79"><td class="memItemLeft" align="right" valign="top"><a id="aff8054f166c9eb81b4e7695bc7f1ec79"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_TCP</b>&#160;&#160;&#160;&quot;tcp://&quot;</td></tr>
<tr class="separator:aff8054f166c9eb81b4e7695bc7f1ec79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61fc7ec5121ebee456c2f4bf445e5965"><td class="memItemLeft" align="right" valign="top"><a id="a61fc7ec5121ebee456c2f4bf445e5965"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_MQTT</b>&#160;&#160;&#160;&quot;mqtt://&quot;</td></tr>
<tr class="separator:a61fc7ec5121ebee456c2f4bf445e5965"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5771cb458542c28e7bd49a92f2840828"><td class="memItemLeft" align="right" valign="top"><a id="a5771cb458542c28e7bd49a92f2840828"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_WS</b>&#160;&#160;&#160;&quot;ws://&quot;</td></tr>
<tr class="separator:a5771cb458542c28e7bd49a92f2840828"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adba1cd25f9e81e0d2b88c905896efb81"><td class="memItemLeft" align="right" valign="top"><a id="adba1cd25f9e81e0d2b88c905896efb81"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>URI_WSS</b>&#160;&#160;&#160;&quot;wss://&quot;</td></tr>
<tr class="separator:adba1cd25f9e81e0d2b88c905896efb81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9aa60e1ead64be77ad551e745cbfd4d3"><td class="memItemLeft" align="right" valign="top"><a id="a9aa60e1ead64be77ad551e745cbfd4d3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>WINAPI</b></td></tr>
<tr class="separator:a9aa60e1ead64be77ad551e745cbfd4d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48e5d65228327c5f6ad9503b0a72db32"><td class="memItemLeft" align="right" valign="top"><a id="a48e5d65228327c5f6ad9503b0a72db32"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_INFO_STRINGS</b>&#160;&#160;&#160;8</td></tr>
<tr class="separator:a48e5d65228327c5f6ad9503b0a72db32"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a4ea0fd02f2e44f48a3285a9191861373"><td class="memItemLeft" align="right" valign="top"><a id="a4ea0fd02f2e44f48a3285a9191861373"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_init</b> (void)</td></tr>
<tr class="separator:a4ea0fd02f2e44f48a3285a9191861373"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21804ede1a506d1d69a472bc30acc8ba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a21804ede1a506d1d69a472bc30acc8ba">MQTTClient_global_init</a> (<a class="el" href="structMQTTClient__init__options.html">MQTTClient_init_options</a> *inits)</td></tr>
<tr class="memdesc:a21804ede1a506d1d69a472bc30acc8ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Global init of mqtt library.  <a href="MQTTClient_8c.html#a21804ede1a506d1d69a472bc30acc8ba">More...</a><br /></td></tr>
<tr class="separator:a21804ede1a506d1d69a472bc30acc8ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae32040ed631457a2881fc0ec456a1daf"><td class="memItemLeft" align="right" valign="top"><a id="ae32040ed631457a2881fc0ec456a1daf"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_terminate</b> (void)</td></tr>
<tr class="separator:ae32040ed631457a2881fc0ec456a1daf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab22f406368730d3782d299bdc12277c9"><td class="memItemLeft" align="right" valign="top"><a id="ab22f406368730d3782d299bdc12277c9"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_emptyMessageQueue</b> (<a class="el" href="structClients.html">Clients</a> *client)</td></tr>
<tr class="separator:ab22f406368730d3782d299bdc12277c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f68a4519b5e0dc57a1d3ead092b52e4"><td class="memItemLeft" align="right" valign="top"><a id="a2f68a4519b5e0dc57a1d3ead092b52e4"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_deliverMessage</b> (int rc, <a class="el" href="structMQTTClients.html">MQTTClients</a> *m, char **topicName, int *topicLen, <a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **message)</td></tr>
<tr class="separator:a2f68a4519b5e0dc57a1d3ead092b52e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac35494adea1f11d3480b50b8a7f0c17d"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ac35494adea1f11d3480b50b8a7f0c17d">clientSockCompare</a> (void *a, void *b)</td></tr>
<tr class="memdesc:ac35494adea1f11d3480b50b8a7f0c17d"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing clients by socket.  <a href="MQTTClient_8c.html#ac35494adea1f11d3480b50b8a7f0c17d">More...</a><br /></td></tr>
<tr class="separator:ac35494adea1f11d3480b50b8a7f0c17d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c0d8194bf8a449928881cf83276728e"><td class="memItemLeft" align="right" valign="top">static thread_return_type WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a0c0d8194bf8a449928881cf83276728e">connectionLost_call</a> (void *context)</td></tr>
<tr class="memdesc:a0c0d8194bf8a449928881cf83276728e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wrapper function to call connection lost on a separate thread.  <a href="MQTTClient_8c.html#a0c0d8194bf8a449928881cf83276728e">More...</a><br /></td></tr>
<tr class="separator:a0c0d8194bf8a449928881cf83276728e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60a613bf8f5dc3d15687ead12b57a5c1"><td class="memItemLeft" align="right" valign="top"><a id="a60a613bf8f5dc3d15687ead12b57a5c1"></a>
static thread_return_type WINAPI&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_run</b> (void *n)</td></tr>
<tr class="separator:a60a613bf8f5dc3d15687ead12b57a5c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a901ba852d2bc777276dfcf6dd834388b"><td class="memItemLeft" align="right" valign="top"><a id="a901ba852d2bc777276dfcf6dd834388b"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_stop</b> (void)</td></tr>
<tr class="separator:a901ba852d2bc777276dfcf6dd834388b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d115d3279d50ec207fa958ebe14c07c"><td class="memItemLeft" align="right" valign="top"><a id="a3d115d3279d50ec207fa958ebe14c07c"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_closeSession</b> (<a class="el" href="structClients.html">Clients</a> *client, enum MQTTReasonCodes reason, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
<tr class="separator:a3d115d3279d50ec207fa958ebe14c07c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03c6f9caa8b75bdcd0d536141ddd8add"><td class="memItemLeft" align="right" valign="top"><a id="a03c6f9caa8b75bdcd0d536141ddd8add"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_cleanSession</b> (<a class="el" href="structClients.html">Clients</a> *client)</td></tr>
<tr class="separator:a03c6f9caa8b75bdcd0d536141ddd8add"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bbe92af0878c896f94855961e31d1d1"><td class="memItemLeft" align="right" valign="top"><a id="a4bbe92af0878c896f94855961e31d1d1"></a>
static <a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_connectURIVersion</b> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options, const char *serverURI, int MQTTVersion, START_TIME_TYPE start, ELAPSED_TIME_TYPE millisecsTimeout, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *connectProperties, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *willProperties)</td></tr>
<tr class="separator:a4bbe92af0878c896f94855961e31d1d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92e78761bef2163632e18e297bc29be5"><td class="memItemLeft" align="right" valign="top"><a id="a92e78761bef2163632e18e297bc29be5"></a>
static <a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_connectURI</b> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options, const char *serverURI, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *connectProperties, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *willProperties)</td></tr>
<tr class="separator:a92e78761bef2163632e18e297bc29be5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2eeb63b405d9aed880a79b38addf6df7"><td class="memItemLeft" align="right" valign="top"><a id="a2eeb63b405d9aed880a79b38addf6df7"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a2eeb63b405d9aed880a79b38addf6df7">MQTTClient_disconnect1</a> (MQTTClient handle, int timeout, int call_connection_lost, int stop, enum MQTTReasonCodes reason, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
<tr class="memdesc:a2eeb63b405d9aed880a79b38addf6df7"><td class="mdescLeft">&#160;</td><td class="mdescRight">mqttclient_mutex must be locked when you call this function, if multi threaded <br /></td></tr>
<tr class="separator:a2eeb63b405d9aed880a79b38addf6df7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a08562ce9b763bf79c71029b94cd9f5"><td class="memItemLeft" align="right" valign="top"><a id="a6a08562ce9b763bf79c71029b94cd9f5"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a6a08562ce9b763bf79c71029b94cd9f5">MQTTClient_disconnect_internal</a> (MQTTClient handle, int timeout)</td></tr>
<tr class="memdesc:a6a08562ce9b763bf79c71029b94cd9f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">mqttclient_mutex must be locked when you call this function, if multi threaded <br /></td></tr>
<tr class="separator:a6a08562ce9b763bf79c71029b94cd9f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a355caa079d8293b37b8e2c9c367e4563"><td class="memItemLeft" align="right" valign="top"><a id="a355caa079d8293b37b8e2c9c367e4563"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_retry</b> (void)</td></tr>
<tr class="separator:a355caa079d8293b37b8e2c9c367e4563"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a872934d31b4a5e81ad329496dfcbe629"><td class="memItemLeft" align="right" valign="top"><a id="a872934d31b4a5e81ad329496dfcbe629"></a>
static <a class="el" href="structMQTTPacket.html">MQTTPacket</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_cycle</b> (SOCKET *sock, ELAPSED_TIME_TYPE timeout, int *rc)</td></tr>
<tr class="separator:a872934d31b4a5e81ad329496dfcbe629"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61a15c5181fd620f696fb91d05303cd3"><td class="memItemLeft" align="right" valign="top"><a id="a61a15c5181fd620f696fb91d05303cd3"></a>
static <a class="el" href="structMQTTPacket.html">MQTTPacket</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_waitfor</b> (MQTTClient handle, int packet_type, int *rc, int64_t timeout)</td></tr>
<tr class="separator:a61a15c5181fd620f696fb91d05303cd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdcf1aefca1dbb3d1b3d36c9bbaf3760"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#acdcf1aefca1dbb3d1b3d36c9bbaf3760">MQTTProtocol_checkPendingWrites</a> (void)</td></tr>
<tr class="memdesc:acdcf1aefca1dbb3d1b3d36c9bbaf3760"><td class="mdescLeft">&#160;</td><td class="mdescRight">See if any pending writes have been completed, and cleanup if so.  <a href="MQTTClient_8c.html#acdcf1aefca1dbb3d1b3d36c9bbaf3760">More...</a><br /></td></tr>
<tr class="separator:acdcf1aefca1dbb3d1b3d36c9bbaf3760"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a208d79938a67d7ba66284ad3d2d0819b"><td class="memItemLeft" align="right" valign="top"><a id="a208d79938a67d7ba66284ad3d2d0819b"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_writeComplete</b> (SOCKET socket, int rc)</td></tr>
<tr class="separator:a208d79938a67d7ba66284ad3d2d0819b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c5b6413c88671683d0fb9a022a61a68"><td class="memItemLeft" align="right" valign="top"><a id="a1c5b6413c88671683d0fb9a022a61a68"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_writeContinue</b> (SOCKET socket)</td></tr>
<tr class="separator:a1c5b6413c88671683d0fb9a022a61a68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade24f717a9b39d38b081e1d5e0db1661"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ade24f717a9b39d38b081e1d5e0db1661">MQTTClient_createWithOptions</a> (MQTTClient *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context, <a class="el" href="structMQTTClient__createOptions.html">MQTTClient_createOptions</a> *options)</td></tr>
<tr class="memdesc:ade24f717a9b39d38b081e1d5e0db1661"><td class="mdescLeft">&#160;</td><td class="mdescRight">A version of :<a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a> with additional options.  <a href="MQTTClient_8c.html#ade24f717a9b39d38b081e1d5e0db1661">More...</a><br /></td></tr>
<tr class="separator:ade24f717a9b39d38b081e1d5e0db1661"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a0518d9ca924d12c1329dbe3de5f2b6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6">MQTTClient_create</a> (MQTTClient *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context)</td></tr>
<tr class="memdesc:a9a0518d9ca924d12c1329dbe3de5f2b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function creates an MQTT client ready for connection to the specified server and using the specified persistent storage (see <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a>).  <a href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6">More...</a><br /></td></tr>
<tr class="separator:a9a0518d9ca924d12c1329dbe3de5f2b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae700c3f5cfea3813264ce95e7c8cf498"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ae700c3f5cfea3813264ce95e7c8cf498">MQTTClient_destroy</a> (MQTTClient *handle)</td></tr>
<tr class="memdesc:ae700c3f5cfea3813264ce95e7c8cf498"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function frees the memory allocated to an MQTT client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>).  <a href="MQTTClient_8c.html#ae700c3f5cfea3813264ce95e7c8cf498">More...</a><br /></td></tr>
<tr class="separator:ae700c3f5cfea3813264ce95e7c8cf498"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bc00ce11e0cac5dbc0938c512b4ab31"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a2bc00ce11e0cac5dbc0938c512b4ab31">MQTTClient_freeMessage</a> (<a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **message)</td></tr>
<tr class="memdesc:a2bc00ce11e0cac5dbc0938c512b4ab31"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function frees memory allocated to an MQTT message, including the additional memory allocated to the message payload.  <a href="MQTTClient_8c.html#a2bc00ce11e0cac5dbc0938c512b4ab31">More...</a><br /></td></tr>
<tr class="separator:a2bc00ce11e0cac5dbc0938c512b4ab31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab217acbfaf47603355ca430983f93095"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ab217acbfaf47603355ca430983f93095">MQTTClient_free</a> (void *memory)</td></tr>
<tr class="memdesc:ab217acbfaf47603355ca430983f93095"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function frees memory allocated by the MQTT C client library, especially the topic name.  <a href="MQTTClient_8c.html#ab217acbfaf47603355ca430983f93095">More...</a><br /></td></tr>
<tr class="separator:ab217acbfaf47603355ca430983f93095"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a6a07529e252574db1f95d40ccc0784"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9a6a07529e252574db1f95d40ccc0784">MQTTClient_malloc</a> (size_t size)</td></tr>
<tr class="memdesc:a9a6a07529e252574db1f95d40ccc0784"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to allocate memory to be used or freed by the MQTT C client library, especially the data in user persistence.  <a href="MQTTClient_8c.html#a9a6a07529e252574db1f95d40ccc0784">More...</a><br /></td></tr>
<tr class="separator:a9a6a07529e252574db1f95d40ccc0784"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01bd2c5f98ec5c0636a106db33f2b01b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a01bd2c5f98ec5c0636a106db33f2b01b">MQTTResponse_free</a> (<a class="el" href="structMQTTResponse.html">MQTTResponse</a> response)</td></tr>
<tr class="memdesc:a01bd2c5f98ec5c0636a106db33f2b01b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees the storage associated with the MQTT response.  <a href="MQTTClient_8c.html#a01bd2c5f98ec5c0636a106db33f2b01b">More...</a><br /></td></tr>
<tr class="separator:a01bd2c5f98ec5c0636a106db33f2b01b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc7d708419664670063a0e7fd9c27bca"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#adc7d708419664670063a0e7fd9c27bca">MQTTClient_setDisconnected</a> (MQTTClient handle, void *context, MQTTClient_disconnected *disconnected)</td></tr>
<tr class="memdesc:adc7d708419664670063a0e7fd9c27bca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the MQTTClient_disconnected() callback function for a client.  <a href="MQTTClient_8c.html#adc7d708419664670063a0e7fd9c27bca">More...</a><br /></td></tr>
<tr class="separator:adc7d708419664670063a0e7fd9c27bca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbcf69dbaf0a0dcbcc87d23f99e73fca"><td class="memItemLeft" align="right" valign="top">static thread_return_type WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#adbcf69dbaf0a0dcbcc87d23f99e73fca">call_disconnected</a> (void *context)</td></tr>
<tr class="memdesc:adbcf69dbaf0a0dcbcc87d23f99e73fca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wrapper function to call disconnected on a separate thread.  <a href="MQTTClient_8c.html#adbcf69dbaf0a0dcbcc87d23f99e73fca">More...</a><br /></td></tr>
<tr class="separator:adbcf69dbaf0a0dcbcc87d23f99e73fca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa594a18474baa9308cb407052d24739d"><td class="memItemLeft" align="right" valign="top"><a id="aa594a18474baa9308cb407052d24739d"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_setPublished</b> (MQTTClient handle, void *context, MQTTClient_published *published)</td></tr>
<tr class="separator:aa594a18474baa9308cb407052d24739d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad27d07782991a4937ebf2f39a021f83"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks</a> (MQTTClient handle, void *context, MQTTClient_connectionLost *cl, MQTTClient_messageArrived *ma, MQTTClient_deliveryComplete *dc)</td></tr>
<tr class="memdesc:aad27d07782991a4937ebf2f39a021f83"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the callback functions for a specific client.  <a href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83">More...</a><br /></td></tr>
<tr class="separator:aad27d07782991a4937ebf2f39a021f83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bf816770b1661fdb62497f44304115e"><td class="memItemLeft" align="right" valign="top"><a id="a7bf816770b1661fdb62497f44304115e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Protocol_processPublication</b> (<a class="el" href="structPublish.html">Publish</a> *publish, <a class="el" href="structClients.html">Clients</a> *client, int allocatePayload)</td></tr>
<tr class="separator:a7bf816770b1661fdb62497f44304115e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8220920e5aeccd2bc98fe480793cdae"><td class="memItemLeft" align="right" valign="top"><a id="ae8220920e5aeccd2bc98fe480793cdae"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setRetryLoopInterval</b> (int keepalive)</td></tr>
<tr class="separator:ae8220920e5aeccd2bc98fe480793cdae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a529ee52c97ce7776a5e5ab429da40b7d"><td class="memItemLeft" align="right" valign="top"><a id="a529ee52c97ce7776a5e5ab429da40b7d"></a>
<a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_connectAll</b> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *connectProperties, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *willProperties)</td></tr>
<tr class="separator:a529ee52c97ce7776a5e5ab429da40b7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa8ae61cd65c9dc0846df10122d7bd4e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e">MQTTClient_connect</a> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options)</td></tr>
<tr class="memdesc:aaa8ae61cd65c9dc0846df10122d7bd4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to connect a previously-created client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>) to an MQTT server using the specified options.  <a href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e">More...</a><br /></td></tr>
<tr class="separator:aaa8ae61cd65c9dc0846df10122d7bd4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa777f80cb3eec5610f976aff30b8c0d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#aa777f80cb3eec5610f976aff30b8c0d6">MQTTClient_connect5</a> (MQTTClient handle, <a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *options, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *connectProperties, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *willProperties)</td></tr>
<tr class="memdesc:aa777f80cb3eec5610f976aff30b8c0d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempts to connect a previously-created client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>) to an MQTT server using MQTT version 5.0 and the specified options.  <a href="MQTTClient_8c.html#aa777f80cb3eec5610f976aff30b8c0d6">More...</a><br /></td></tr>
<tr class="separator:aa777f80cb3eec5610f976aff30b8c0d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f7b0789ff9ca9ded72dbad2e747b333"><td class="memItemLeft" align="right" valign="top"><a id="a9f7b0789ff9ca9ded72dbad2e747b333"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9f7b0789ff9ca9ded72dbad2e747b333">MQTTProtocol_closeSession</a> (<a class="el" href="structClients.html">Clients</a> *c, int sendwill)</td></tr>
<tr class="memdesc:a9f7b0789ff9ca9ded72dbad2e747b333"><td class="mdescLeft">&#160;</td><td class="mdescRight">mqttclient_mutex must be locked when you call this function, if multi threaded <br /></td></tr>
<tr class="separator:a9f7b0789ff9ca9ded72dbad2e747b333"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e4d90c13a3c0705bc4a13bfe64e6525"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a1e4d90c13a3c0705bc4a13bfe64e6525">MQTTClient_disconnect</a> (MQTTClient handle, int timeout)</td></tr>
<tr class="memdesc:a1e4d90c13a3c0705bc4a13bfe64e6525"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to disconnect the client from the MQTT server.  <a href="MQTTClient_8c.html#a1e4d90c13a3c0705bc4a13bfe64e6525">More...</a><br /></td></tr>
<tr class="separator:a1e4d90c13a3c0705bc4a13bfe64e6525"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1762c469715b7f718c4e63a427e6c13c"><td class="memItemLeft" align="right" valign="top"><a id="a1762c469715b7f718c4e63a427e6c13c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>MQTTClient_disconnect5</b> (MQTTClient handle, int timeout, enum MQTTReasonCodes reason, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
<tr class="separator:a1762c469715b7f718c4e63a427e6c13c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e8231e8c47f6f67f7ebbb5dcb4c69c0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">MQTTClient_isConnected</a> (MQTTClient handle)</td></tr>
<tr class="memdesc:a6e8231e8c47f6f67f7ebbb5dcb4c69c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function allows the client application to test whether or not a client is currently connected to the MQTT server.  <a href="MQTTClient_8c.html#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">More...</a><br /></td></tr>
<tr class="separator:a6e8231e8c47f6f67f7ebbb5dcb4c69c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5390c2402f135c12826ffbf6fc261f7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c">MQTTClient_subscribeMany5</a> (MQTTClient handle, int count, char *const *topic, int *qos, <a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *opts, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
<tr class="memdesc:a5390c2402f135c12826ffbf6fc261f7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to subscribe an MQTT version 5.0 client to a list of topics, which may contain wildcards (see wildcard).  <a href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c">More...</a><br /></td></tr>
<tr class="separator:a5390c2402f135c12826ffbf6fc261f7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92fa1c13f3db8399e042fbdbdfb692b3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a92fa1c13f3db8399e042fbdbdfb692b3">MQTTClient_subscribeMany</a> (MQTTClient handle, int count, char *const *topic, int *qos)</td></tr>
<tr class="memdesc:a92fa1c13f3db8399e042fbdbdfb692b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wildcard).  <a href="MQTTClient_8c.html#a92fa1c13f3db8399e042fbdbdfb692b3">More...</a><br /></td></tr>
<tr class="separator:a92fa1c13f3db8399e042fbdbdfb692b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af35ab7375435f7b6388c5ff4610dad3d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#af35ab7375435f7b6388c5ff4610dad3d">MQTTClient_subscribe5</a> (MQTTClient handle, const char *topic, int qos, <a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *opts, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
<tr class="memdesc:af35ab7375435f7b6388c5ff4610dad3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to subscribe an MQTT version 5.0 client to a single topic, which may contain wildcards (see wildcard).  <a href="MQTTClient_8c.html#af35ab7375435f7b6388c5ff4610dad3d">More...</a><br /></td></tr>
<tr class="separator:af35ab7375435f7b6388c5ff4610dad3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c1c28258f0d5c6a44ff53a98618f5f3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9c1c28258f0d5c6a44ff53a98618f5f3">MQTTClient_subscribe</a> (MQTTClient handle, const char *topic, int qos)</td></tr>
<tr class="memdesc:a9c1c28258f0d5c6a44ff53a98618f5f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to subscribe a client to a single topic, which may contain wildcards (see wildcard).  <a href="MQTTClient_8c.html#a9c1c28258f0d5c6a44ff53a98618f5f3">More...</a><br /></td></tr>
<tr class="separator:a9c1c28258f0d5c6a44ff53a98618f5f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46bdb532d2153110ccffb2f0748d1ba5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5">MQTTClient_unsubscribeMany5</a> (MQTTClient handle, int count, char *const *topic, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
<tr class="memdesc:a46bdb532d2153110ccffb2f0748d1ba5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to remove existing subscriptions to a list of topics made by the specified client using MQTT version 5.0.  <a href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5">More...</a><br /></td></tr>
<tr class="separator:a46bdb532d2153110ccffb2f0748d1ba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50abbce720d50b9f84b97ff9fa1f546d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a50abbce720d50b9f84b97ff9fa1f546d">MQTTClient_unsubscribeMany</a> (MQTTClient handle, int count, char *const *topic)</td></tr>
<tr class="memdesc:a50abbce720d50b9f84b97ff9fa1f546d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to remove existing subscriptions to a list of topics made by the specified client.  <a href="MQTTClient_8c.html#a50abbce720d50b9f84b97ff9fa1f546d">More...</a><br /></td></tr>
<tr class="separator:a50abbce720d50b9f84b97ff9fa1f546d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58356c13867f18df60fd4c7ec9457c48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a58356c13867f18df60fd4c7ec9457c48">MQTTClient_unsubscribe5</a> (MQTTClient handle, const char *topic, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *props)</td></tr>
<tr class="memdesc:a58356c13867f18df60fd4c7ec9457c48"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to remove an existing subscription made by the specified client using MQTT 5.0.  <a href="MQTTClient_8c.html#a58356c13867f18df60fd4c7ec9457c48">More...</a><br /></td></tr>
<tr class="separator:a58356c13867f18df60fd4c7ec9457c48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8731be3dbc6a25f41f037f8bbbb054b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#aa8731be3dbc6a25f41f037f8bbbb054b">MQTTClient_unsubscribe</a> (MQTTClient handle, const char *topic)</td></tr>
<tr class="memdesc:aa8731be3dbc6a25f41f037f8bbbb054b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to remove an existing subscription made by the specified client.  <a href="MQTTClient_8c.html#aa8731be3dbc6a25f41f037f8bbbb054b">More...</a><br /></td></tr>
<tr class="separator:aa8731be3dbc6a25f41f037f8bbbb054b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c0ca97b393eee10d4f441ba68830e83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83">MQTTClient_publish5</a> (MQTTClient handle, const char *topicName, int payloadlen, const void *payload, int qos, int retained, <a class="el" href="structMQTTProperties.html">MQTTProperties</a> *properties, MQTTClient_deliveryToken *deliveryToken)</td></tr>
<tr class="memdesc:a3c0ca97b393eee10d4f441ba68830e83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempts to publish a message to a given topic using MQTT version 5.0 (see also <a class="el" href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461" title="Attempts to publish a message to the given topic using MQTT version 5.0 (see also MQTTClient_publish5...">MQTTClient_publishMessage5()</a>).  <a href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83">More...</a><br /></td></tr>
<tr class="separator:a3c0ca97b393eee10d4f441ba68830e83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cd7a94b48d1d9c6b8af4b9203d69d37"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37">MQTTClient_publish</a> (MQTTClient handle, const char *topicName, int payloadlen, const void *payload, int qos, int retained, MQTTClient_deliveryToken *deliveryToken)</td></tr>
<tr class="memdesc:a3cd7a94b48d1d9c6b8af4b9203d69d37"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to publish a message to a given topic (see also <a class="el" href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3" title="This function attempts to publish a message to a given topic (see also MQTTClient_publish()).">MQTTClient_publishMessage()</a>).  <a href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37">More...</a><br /></td></tr>
<tr class="separator:a3cd7a94b48d1d9c6b8af4b9203d69d37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae54936bf7680dcde353e6fc785a44461"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461">MQTTClient_publishMessage5</a> (MQTTClient handle, const char *topicName, <a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> *message, MQTTClient_deliveryToken *deliveryToken)</td></tr>
<tr class="memdesc:ae54936bf7680dcde353e6fc785a44461"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempts to publish a message to the given topic using MQTT version 5.0 (see also <a class="el" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes...">MQTTClient_publish5()</a>).  <a href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461">More...</a><br /></td></tr>
<tr class="separator:ae54936bf7680dcde353e6fc785a44461"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e0cfa14237d7557bee2a59747ecadd3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3">MQTTClient_publishMessage</a> (MQTTClient handle, const char *topicName, <a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> *message, MQTTClient_deliveryToken *deliveryToken)</td></tr>
<tr class="memdesc:a5e0cfa14237d7557bee2a59747ecadd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function attempts to publish a message to a given topic (see also <a class="el" href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37" title="This function attempts to publish a message to a given topic (see also MQTTClient_publishMessage()).">MQTTClient_publish()</a>).  <a href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3">More...</a><br /></td></tr>
<tr class="separator:a5e0cfa14237d7557bee2a59747ecadd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c2df88d00a3dadd510a8cb774739366"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a4c2df88d00a3dadd510a8cb774739366">MQTTClient_receive</a> (MQTTClient handle, char **topicName, int *topicLen, <a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **message, unsigned long timeout)</td></tr>
<tr class="memdesc:a4c2df88d00a3dadd510a8cb774739366"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs a synchronous receive of incoming messages.  <a href="MQTTClient_8c.html#a4c2df88d00a3dadd510a8cb774739366">More...</a><br /></td></tr>
<tr class="separator:a4c2df88d00a3dadd510a8cb774739366"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ad3d29864a9ca08202b0832e0f6678e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a8ad3d29864a9ca08202b0832e0f6678e">MQTTClient_yield</a> (void)</td></tr>
<tr class="memdesc:a8ad3d29864a9ca08202b0832e0f6678e"><td class="mdescLeft">&#160;</td><td class="mdescRight">When implementing a single-threaded client, call this function periodically to allow processing of message retries and to send MQTT keepalive pings.  <a href="MQTTClient_8c.html#a8ad3d29864a9ca08202b0832e0f6678e">More...</a><br /></td></tr>
<tr class="separator:a8ad3d29864a9ca08202b0832e0f6678e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8786efdd6c3a50c6ca33cfb5d8fc283"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283">MQTTClient_waitForCompletion</a> (MQTTClient handle, MQTTClient_deliveryToken mdt, unsigned long timeout)</td></tr>
<tr class="memdesc:ab8786efdd6c3a50c6ca33cfb5d8fc283"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called by the client application to synchronize execution of the main thread with completed publication of a message.  <a href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283">More...</a><br /></td></tr>
<tr class="separator:ab8786efdd6c3a50c6ca33cfb5d8fc283"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a617c6b0492c04a4ddea592f5e53604"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a2a617c6b0492c04a4ddea592f5e53604">MQTTClient_getPendingDeliveryTokens</a> (MQTTClient handle, MQTTClient_deliveryToken **tokens)</td></tr>
<tr class="memdesc:a2a617c6b0492c04a4ddea592f5e53604"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets a pointer to an array of delivery tokens for messages that are currently in-flight (pending completion).  <a href="MQTTClient_8c.html#a2a617c6b0492c04a4ddea592f5e53604">More...</a><br /></td></tr>
<tr class="separator:a2a617c6b0492c04a4ddea592f5e53604"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dfa35d29db54b10b15b8ac2d9a778be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a4dfa35d29db54b10b15b8ac2d9a778be">MQTTClient_setTraceLevel</a> (enum MQTTCLIENT_TRACE_LEVELS level)</td></tr>
<tr class="memdesc:a4dfa35d29db54b10b15b8ac2d9a778be"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the level of trace information which will be returned in the trace callback.  <a href="MQTTClient_8c.html#a4dfa35d29db54b10b15b8ac2d9a778be">More...</a><br /></td></tr>
<tr class="separator:a4dfa35d29db54b10b15b8ac2d9a778be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22870f94aa4cb1827626612f1ded7c69"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a22870f94aa4cb1827626612f1ded7c69">MQTTClient_setTraceCallback</a> (MQTTClient_traceCallback *callback)</td></tr>
<tr class="memdesc:a22870f94aa4cb1827626612f1ded7c69"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the trace callback if needed.  <a href="MQTTClient_8c.html#a22870f94aa4cb1827626612f1ded7c69">More...</a><br /></td></tr>
<tr class="separator:a22870f94aa4cb1827626612f1ded7c69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96067a2fb74d2a61c7e93015629548e0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a96067a2fb74d2a61c7e93015629548e0">MQTTClient_setCommandTimeout</a> (MQTTClient handle, unsigned long milliSeconds)</td></tr>
<tr class="memdesc:a96067a2fb74d2a61c7e93015629548e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the timeout value for un/subscribe commands when waiting for the un/suback response from the server.  <a href="MQTTClient_8c.html#a96067a2fb74d2a61c7e93015629548e0">More...</a><br /></td></tr>
<tr class="separator:a96067a2fb74d2a61c7e93015629548e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe842456c914ce9201d277a972cc085e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMQTTClient__nameValue.html">MQTTClient_nameValue</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#abe842456c914ce9201d277a972cc085e">MQTTClient_getVersionInfo</a> (void)</td></tr>
<tr class="memdesc:abe842456c914ce9201d277a972cc085e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns version information about the library.  <a href="MQTTClient_8c.html#abe842456c914ce9201d277a972cc085e">More...</a><br /></td></tr>
<tr class="separator:abe842456c914ce9201d277a972cc085e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9defda2979f6fedaae64fd85f5c2f617"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTClient_8c.html#a9defda2979f6fedaae64fd85f5c2f617">MQTTClient_strerror</a> (int code)</td></tr>
<tr class="memdesc:a9defda2979f6fedaae64fd85f5c2f617"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the string representation of the error or NULL.  <a href="MQTTClient_8c.html#a9defda2979f6fedaae64fd85f5c2f617">More...</a><br /></td></tr>
<tr class="separator:a9defda2979f6fedaae64fd85f5c2f617"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a002f05835324a6cbd270ff94de6be02e"><td class="memItemLeft" align="right" valign="top"><a id="a002f05835324a6cbd270ff94de6be02e"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>client_timestamp_eye</b> = &quot;MQTTClientV3_Timestamp &quot; BUILD_TIMESTAMP</td></tr>
<tr class="separator:a002f05835324a6cbd270ff94de6be02e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e5c55b41667da1b47178c4a0997628c"><td class="memItemLeft" align="right" valign="top"><a id="a9e5c55b41667da1b47178c4a0997628c"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>client_version_eye</b> = &quot;MQTTClientV3_Version &quot; CLIENT_VERSION</td></tr>
<tr class="separator:a9e5c55b41667da1b47178c4a0997628c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7de1b785bccb15bfa46dcf3a6706aad0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structClientStates.html">ClientStates</a>&#160;</td><td class="memItemRight" valign="bottom"><b>ClientState</b></td></tr>
<tr class="separator:a7de1b785bccb15bfa46dcf3a6706aad0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f44b42678b96ba591f6042671e3ba6b"><td class="memItemLeft" align="right" valign="top"><a id="a2f44b42678b96ba591f6042671e3ba6b"></a>
<a class="el" href="structClientStates.html">ClientStates</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>bstate</b> = &amp;ClientState</td></tr>
<tr class="separator:a2f44b42678b96ba591f6042671e3ba6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memItemLeft" align="right" valign="top"><a id="a2dc95966878cf339e99ab7f7d1f7cc82"></a>
<a class="el" href="structMQTTProtocol.html">MQTTProtocol</a>&#160;</td><td class="memItemRight" valign="bottom"><b>state</b></td></tr>
<tr class="separator:a2dc95966878cf339e99ab7f7d1f7cc82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a238cb4b93c0ffe869accf47116a3e022"><td class="memItemLeft" align="right" valign="top"><a id="a238cb4b93c0ffe869accf47116a3e022"></a>
static pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><b>mqttclient_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
<tr class="separator:a238cb4b93c0ffe869accf47116a3e022"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34d74bdafe1f165a7c7b3f204212b1dd"><td class="memItemLeft" align="right" valign="top"><a id="a34d74bdafe1f165a7c7b3f204212b1dd"></a>
static mutex_type&#160;</td><td class="memItemRight" valign="bottom"><b>mqttclient_mutex</b> = &amp;mqttclient_mutex_store</td></tr>
<tr class="separator:a34d74bdafe1f165a7c7b3f204212b1dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53ea93ecc4a4eef4286f0dfd4be5aafb"><td class="memItemLeft" align="right" valign="top"><a id="a53ea93ecc4a4eef4286f0dfd4be5aafb"></a>
static pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><b>socket_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
<tr class="separator:a53ea93ecc4a4eef4286f0dfd4be5aafb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e21c80906915bcadf7b0937235a3416"><td class="memItemLeft" align="right" valign="top"><a id="a2e21c80906915bcadf7b0937235a3416"></a>
mutex_type&#160;</td><td class="memItemRight" valign="bottom"><b>socket_mutex</b> = &amp;socket_mutex_store</td></tr>
<tr class="separator:a2e21c80906915bcadf7b0937235a3416"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39d35b6edc70eb0a0878527187188a5d"><td class="memItemLeft" align="right" valign="top"><a id="a39d35b6edc70eb0a0878527187188a5d"></a>
static pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><b>subscribe_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
<tr class="separator:a39d35b6edc70eb0a0878527187188a5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57d1d41fc77b4fd3b35d92998e3caf88"><td class="memItemLeft" align="right" valign="top"><a id="a57d1d41fc77b4fd3b35d92998e3caf88"></a>
static mutex_type&#160;</td><td class="memItemRight" valign="bottom"><b>subscribe_mutex</b> = &amp;subscribe_mutex_store</td></tr>
<tr class="separator:a57d1d41fc77b4fd3b35d92998e3caf88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04d2f8260515229acdcc8c6c378bd6f1"><td class="memItemLeft" align="right" valign="top"><a id="a04d2f8260515229acdcc8c6c378bd6f1"></a>
static pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><b>connect_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
<tr class="separator:a04d2f8260515229acdcc8c6c378bd6f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecac74d6e790ccf5af3918553b040bde"><td class="memItemLeft" align="right" valign="top"><a id="aecac74d6e790ccf5af3918553b040bde"></a>
static mutex_type&#160;</td><td class="memItemRight" valign="bottom"><b>connect_mutex</b> = &amp;connect_mutex_store</td></tr>
<tr class="separator:aecac74d6e790ccf5af3918553b040bde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a733a136a6ae351b9c145b3fc5af04aa0"><td class="memItemLeft" align="right" valign="top"><a id="a733a136a6ae351b9c145b3fc5af04aa0"></a>
static volatile int&#160;</td><td class="memItemRight" valign="bottom"><b>library_initialized</b> = 0</td></tr>
<tr class="separator:a733a136a6ae351b9c145b3fc5af04aa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96317981ac7f003130a55ffda157c4c1"><td class="memItemLeft" align="right" valign="top"><a id="a96317981ac7f003130a55ffda157c4c1"></a>
static <a class="el" href="structList.html">List</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>handles</b> = NULL</td></tr>
<tr class="separator:a96317981ac7f003130a55ffda157c4c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f45113638a0b749a8a205d2cd7fb42b"><td class="memItemLeft" align="right" valign="top"><a id="a2f45113638a0b749a8a205d2cd7fb42b"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>running</b> = 0</td></tr>
<tr class="separator:a2f45113638a0b749a8a205d2cd7fb42b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a347200bb2e843926f1be8fb43de273b3"><td class="memItemLeft" align="right" valign="top"><a id="a347200bb2e843926f1be8fb43de273b3"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>tostop</b> = 0</td></tr>
<tr class="separator:a347200bb2e843926f1be8fb43de273b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5badf3940b33aca748205668c626668"><td class="memItemLeft" align="right" valign="top"><a id="aa5badf3940b33aca748205668c626668"></a>
static thread_id_type&#160;</td><td class="memItemRight" valign="bottom"><b>run_id</b> = 0</td></tr>
<tr class="separator:aa5badf3940b33aca748205668c626668"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25522fe2dcb57f8f4338355b6b89b671"><td class="memItemLeft" align="right" valign="top"><a id="a25522fe2dcb57f8f4338355b6b89b671"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>retryLoopIntervalms</b> = 5000</td></tr>
<tr class="separator:a25522fe2dcb57f8f4338355b6b89b671"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Synchronous API implementation. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="adbcf69dbaf0a0dcbcc87d23f99e73fca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbcf69dbaf0a0dcbcc87d23f99e73fca">&#9670;&nbsp;</a></span>call_disconnected()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static thread_return_type WINAPI call_disconnected </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Wrapper function to call disconnected on a separate thread. </p>
<p>A separate thread is needed to allow the disconnected function to make API calls (e.g. connect) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>a pointer to the relevant client </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>thread_return_type standard thread return value - not used here </dd></dl>

</div>
</div>
<a id="ac35494adea1f11d3480b50b8a7f0c17d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac35494adea1f11d3480b50b8a7f0c17d">&#9670;&nbsp;</a></span>clientSockCompare()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int clientSockCompare </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing clients by socket. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>first integer value </td></tr>
    <tr><td class="paramname">b</td><td>second integer value </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>

</div>
</div>
<a id="a0c0d8194bf8a449928881cf83276728e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c0d8194bf8a449928881cf83276728e">&#9670;&nbsp;</a></span>connectionLost_call()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static thread_return_type WINAPI connectionLost_call </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Wrapper function to call connection lost on a separate thread. </p>
<p>A separate thread is needed to allow the connectionLost function to make API calls (e.g. connect) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>a pointer to the relevant client </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>thread_return_type standard thread return value - not used here </dd></dl>

</div>
</div>
<a id="aaa8ae61cd65c9dc0846df10122d7bd4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa8ae61cd65c9dc0846df10122d7bd4e">&#9670;&nbsp;</a></span>MQTTClient_connect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_connect </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *&#160;</td>
          <td class="paramname"><em>options</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to connect a previously-created client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>) to an MQTT server using the specified options. </p>
<p>If you want to enable asynchronous message and status notifications, you must call <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a> prior to <a class="el" href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e" title="This function attempts to connect a previously-created client (see MQTTClient_create()) to an MQTT se...">MQTTClient_connect()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">options</td><td>A pointer to a valid <a class="el" href="structMQTTClient__connectOptions.html" title="MQTTClient_connectOptions defines several settings that control the way the client connects to an MQT...">MQTTClient_connectOptions</a> structure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client successfully connects to the server. An error code is returned if the client was unable to connect to the server. Error codes greater than 0 are returned by the MQTT protocol:<br  />
<br  />
 <b>1</b>: Connection refused: Unacceptable protocol version<br  />
 <b>2</b>: Connection refused: Identifier rejected<br  />
 <b>3</b>: Connection refused: Server unavailable<br  />
 <b>4</b>: Connection refused: Bad user name or password<br  />
 <b>5</b>: Connection refused: Not authorized<br  />
 <b>6-255</b>: Reserved for future use<br  />
 </dd></dl>

</div>
</div>
<a id="aa777f80cb3eec5610f976aff30b8c0d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa777f80cb3eec5610f976aff30b8c0d6">&#9670;&nbsp;</a></span>MQTTClient_connect5()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_connect5 </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTClient__connectOptions.html">MQTTClient_connectOptions</a> *&#160;</td>
          <td class="paramname"><em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
          <td class="paramname"><em>connectProperties</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
          <td class="paramname"><em>willProperties</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Attempts to connect a previously-created client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>) to an MQTT server using MQTT version 5.0 and the specified options. </p>
<p>If you want to enable asynchronous message and status notifications, you must call <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a> prior to <a class="el" href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e" title="This function attempts to connect a previously-created client (see MQTTClient_create()) to an MQTT se...">MQTTClient_connect()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">options</td><td>A pointer to a valid <a class="el" href="structMQTTClient__connectOptions.html" title="MQTTClient_connectOptions defines several settings that control the way the client connects to an MQT...">MQTTClient_connectOptions</a> structure. </td></tr>
    <tr><td class="paramname">connectProperties</td><td>the MQTT 5.0 connect properties to use </td></tr>
    <tr><td class="paramname">willProperties</td><td>the MQTT 5.0 properties to set on the will message </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>

</div>
</div>
<a id="a9a0518d9ca924d12c1329dbe3de5f2b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a0518d9ca924d12c1329dbe3de5f2b6">&#9670;&nbsp;</a></span>MQTTClient_create()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_create </td>
          <td>(</td>
          <td class="paramtype">MQTTClient *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>serverURI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>clientId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>persistence_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>persistence_context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function creates an MQTT client ready for connection to the specified server and using the specified persistent storage (see <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a>). </p>
<p>See also <a class="el" href="MQTTClient_8c.html#ae700c3f5cfea3813264ce95e7c8cf498" title="This function frees the memory allocated to an MQTT client (see MQTTClient_create()).">MQTTClient_destroy()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A pointer to an ::MQTTClient handle. The handle is populated with a valid client reference following a successful return from this function. </td></tr>
    <tr><td class="paramname">serverURI</td><td>A null-terminated string specifying the server to which the client will connect. It takes the form <em>protocol://host:port</em>. Currently, <em>protocol</em> must be: <br  />
 <em>tcp://</em> or <em>mqtt://</em> - Insecure TCP <br  />
 <em>ssl://</em> or <em>mqtts://</em> - Encrypted SSL/TLS <br  />
 <em>ws://</em> - Insecure websockets <br  />
 <em>wss://</em> - Secure web sockets <br  />
 The TLS enabled prefixes (ssl, mqtts, wss) are only valid if a TLS version of the library is linked with. For <em>host</em>, you can specify either an IP address or a host name. For instance, to connect to a server running on the local machines with the default MQTT port, specify <em>tcp://localhost:1883</em>. </td></tr>
    <tr><td class="paramname">clientId</td><td>The client identifier passed to the server when the client connects to it. It is a null-terminated UTF-8 encoded string. </td></tr>
    <tr><td class="paramname">persistence_type</td><td>The type of persistence to be used by the client: <br  />
 <a class="el" href="MQTTClientPersistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa" title="This persistence_type value specifies a memory-based persistence mechanism (see MQTTClient_create()).">MQTTCLIENT_PERSISTENCE_NONE</a>: Use in-memory persistence. If the device or system on which the client is running fails or is switched off, the current state of any in-flight messages is lost and some messages may not be delivered even at QoS1 and QoS2. <br  />
 <a class="el" href="MQTTClientPersistence_8h.html#aaa948291718a9c06369b854b0f64bc32" title="This persistence_type value specifies the default file system-based persistence mechanism (see MQTTCl...">MQTTCLIENT_PERSISTENCE_DEFAULT</a>: Use the default (file system-based) persistence mechanism. Status about in-flight messages is held in persistent storage and provides some protection against message loss in the case of unexpected failure. <br  />
 <a class="el" href="MQTTClientPersistence_8h.html#a5dc68b8616e4041e037bad94ce07681b" title="This persistence_type value specifies an application-specific persistence mechanism (see MQTTClient_c...">MQTTCLIENT_PERSISTENCE_USER</a>: Use an application-specific persistence implementation. Using this type of persistence gives control of the persistence mechanism to the application. The application has to implement the <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a> interface. </td></tr>
    <tr><td class="paramname">persistence_context</td><td>If the application uses <a class="el" href="MQTTClientPersistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa" title="This persistence_type value specifies a memory-based persistence mechanism (see MQTTClient_create()).">MQTTCLIENT_PERSISTENCE_NONE</a> persistence, this argument is unused and should be set to NULL. For <a class="el" href="MQTTClientPersistence_8h.html#aaa948291718a9c06369b854b0f64bc32" title="This persistence_type value specifies the default file system-based persistence mechanism (see MQTTCl...">MQTTCLIENT_PERSISTENCE_DEFAULT</a> persistence, it should be set to the location of the persistence directory (if set to NULL, the persistence directory used is the working directory). Applications that use <a class="el" href="MQTTClientPersistence_8h.html#a5dc68b8616e4041e037bad94ce07681b" title="This persistence_type value specifies an application-specific persistence mechanism (see MQTTClient_c...">MQTTCLIENT_PERSISTENCE_USER</a> persistence set this argument to point to a valid <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a> structure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client is successfully created, otherwise an error code is returned. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph.png" border="0" usemap="#aMQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph" id="aMQTTClient_8c_a9a0518d9ca924d12c1329dbe3de5f2b6_cgraph">
<area shape="rect" title="This function creates an MQTT client ready for connection to the specified server and using the speci..." alt="" coords="5,5,140,32"/>
<area shape="rect" href="MQTTClient_8c.html#ade24f717a9b39d38b081e1d5e0db1661" title="A version of :MQTTClient_create() with additional options." alt="" coords="188,5,395,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="443,5,611,32"/>
</map>
</div>

</div>
</div>
<a id="ade24f717a9b39d38b081e1d5e0db1661"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade24f717a9b39d38b081e1d5e0db1661">&#9670;&nbsp;</a></span>MQTTClient_createWithOptions()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_createWithOptions </td>
          <td>(</td>
          <td class="paramtype">MQTTClient *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>serverURI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>clientId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>persistence_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>persistence_context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTClient__createOptions.html">MQTTClient_createOptions</a> *&#160;</td>
          <td class="paramname"><em>options</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A version of :<a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a> with additional options. </p>
<p>This function creates an MQTT client ready for connection to the specified server and using the specified persistent storage (see <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a>). See also <a class="el" href="MQTTClient_8c.html#ae700c3f5cfea3813264ce95e7c8cf498" title="This function frees the memory allocated to an MQTT client (see MQTTClient_create()).">MQTTClient_destroy()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A pointer to an ::MQTTClient handle. The handle is populated with a valid client reference following a successful return from this function. </td></tr>
    <tr><td class="paramname">serverURI</td><td>A null-terminated string specifying the server to which the client will connect. It takes the form <em>protocol://host:port</em>. Currently, <em>protocol</em> must be <em>tcp</em> or <em>ssl</em>. For <em>host</em>, you can specify either an IP address or a host name. For instance, to connect to a server running on the local machines with the default MQTT port, specify <em>tcp://localhost:1883</em>. </td></tr>
    <tr><td class="paramname">clientId</td><td>The client identifier passed to the server when the client connects to it. It is a null-terminated UTF-8 encoded string. </td></tr>
    <tr><td class="paramname">persistence_type</td><td>The type of persistence to be used by the client: <br  />
 <a class="el" href="MQTTClientPersistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa" title="This persistence_type value specifies a memory-based persistence mechanism (see MQTTClient_create()).">MQTTCLIENT_PERSISTENCE_NONE</a>: Use in-memory persistence. If the device or system on which the client is running fails or is switched off, the current state of any in-flight messages is lost and some messages may not be delivered even at QoS1 and QoS2. <br  />
 <a class="el" href="MQTTClientPersistence_8h.html#aaa948291718a9c06369b854b0f64bc32" title="This persistence_type value specifies the default file system-based persistence mechanism (see MQTTCl...">MQTTCLIENT_PERSISTENCE_DEFAULT</a>: Use the default (file system-based) persistence mechanism. Status about in-flight messages is held in persistent storage and provides some protection against message loss in the case of unexpected failure. <br  />
 <a class="el" href="MQTTClientPersistence_8h.html#a5dc68b8616e4041e037bad94ce07681b" title="This persistence_type value specifies an application-specific persistence mechanism (see MQTTClient_c...">MQTTCLIENT_PERSISTENCE_USER</a>: Use an application-specific persistence implementation. Using this type of persistence gives control of the persistence mechanism to the application. The application has to implement the <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a> interface. </td></tr>
    <tr><td class="paramname">persistence_context</td><td>If the application uses <a class="el" href="MQTTClientPersistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa" title="This persistence_type value specifies a memory-based persistence mechanism (see MQTTClient_create()).">MQTTCLIENT_PERSISTENCE_NONE</a> persistence, this argument is unused and should be set to NULL. For <a class="el" href="MQTTClientPersistence_8h.html#aaa948291718a9c06369b854b0f64bc32" title="This persistence_type value specifies the default file system-based persistence mechanism (see MQTTCl...">MQTTCLIENT_PERSISTENCE_DEFAULT</a> persistence, it should be set to the location of the persistence directory (if set to NULL, the persistence directory used is the working directory). Applications that use <a class="el" href="MQTTClientPersistence_8h.html#a5dc68b8616e4041e037bad94ce07681b" title="This persistence_type value specifies an application-specific persistence mechanism (see MQTTClient_c...">MQTTCLIENT_PERSISTENCE_USER</a> persistence set this argument to point to a valid <a class="el" href="structMQTTClient__persistence.html" title="A structure containing the function pointers to a persistence implementation and the context or state...">MQTTClient_persistence</a> structure. </td></tr>
    <tr><td class="paramname">options</td><td>additional options for the create. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client is successfully created, otherwise an error code is returned. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph.png" border="0" usemap="#aMQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph" id="aMQTTClient_8c_ade24f717a9b39d38b081e1d5e0db1661_cgraph">
<area shape="rect" title="A version of :MQTTClient_create() with additional options." alt="" coords="5,5,212,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="260,5,428,32"/>
</map>
</div>

</div>
</div>
<a id="ae700c3f5cfea3813264ce95e7c8cf498"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae700c3f5cfea3813264ce95e7c8cf498">&#9670;&nbsp;</a></span>MQTTClient_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MQTTClient_destroy </td>
          <td>(</td>
          <td class="paramtype">MQTTClient *&#160;</td>
          <td class="paramname"><em>handle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function frees the memory allocated to an MQTT client (see <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>). </p>
<p>It should be called when the client is no longer required. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A pointer to the handle referring to the ::MQTTClient structure to be freed. </td></tr>
  </table>
  </dd>
</dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph.png" border="0" usemap="#aMQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph" id="aMQTTClient_8c_ae700c3f5cfea3813264ce95e7c8cf498_cgraph">
<area shape="rect" title="This function frees the memory allocated to an MQTT client (see MQTTClient_create())." alt="" coords="5,5,147,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="195,5,363,32"/>
</map>
</div>

</div>
</div>
<a id="a1e4d90c13a3c0705bc4a13bfe64e6525"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e4d90c13a3c0705bc4a13bfe64e6525">&#9670;&nbsp;</a></span>MQTTClient_disconnect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_disconnect </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to disconnect the client from the MQTT server. </p>
<p>In order to allow the client time to complete handling of messages that are in-flight when this function is called, a timeout period is specified. When the timeout period has expired, the client disconnects even if there are still outstanding message acknowledgements. The next time the client connects to the same server, any QoS 1 or 2 messages which have not completed will be retried depending on the cleansession settings for both the previous and the new connection (see <a class="el" href="structMQTTClient__connectOptions.html#a03a2cfaf17483f1b0aab2a70f3ef30d9" title="This is a boolean value.">MQTTClient_connectOptions.cleansession</a> and <a class="el" href="MQTTClient_8c.html#aaa8ae61cd65c9dc0846df10122d7bd4e" title="This function attempts to connect a previously-created client (see MQTTClient_create()) to an MQTT se...">MQTTClient_connect()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">timeout</td><td>The client delays disconnection for up to this time (in milliseconds) in order to allow in-flight message transfers to complete. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the client successfully disconnects from the server. An error code is returned if the client was unable to disconnect from the server </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph.png" border="0" usemap="#aMQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph" id="aMQTTClient_8c_a1e4d90c13a3c0705bc4a13bfe64e6525_cgraph">
<area shape="rect" title="This function attempts to disconnect the client from the MQTT server." alt="" coords="5,5,168,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="216,5,384,32"/>
</map>
</div>

</div>
</div>
<a id="ab217acbfaf47603355ca430983f93095"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab217acbfaf47603355ca430983f93095">&#9670;&nbsp;</a></span>MQTTClient_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MQTTClient_free </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function frees memory allocated by the MQTT C client library, especially the topic name. </p>
<p>This is needed on Windows when the client libary and application program have been compiled with different versions of the C compiler. It is thus good policy to always use this function when freeing any MQTT C client- allocated memory. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ptr</td><td>The pointer to the client library storage to be freed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2bc00ce11e0cac5dbc0938c512b4ab31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bc00ce11e0cac5dbc0938c512b4ab31">&#9670;&nbsp;</a></span>MQTTClient_freeMessage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MQTTClient_freeMessage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function frees memory allocated to an MQTT message, including the additional memory allocated to the message payload. </p>
<p>The client application calls this function when the message has been fully processed. <b>Important note:</b> This function does not free the memory allocated to a message topic string. It is the responsibility of the client application to free this memory using the <a class="el" href="MQTTClient_8c.html#ab217acbfaf47603355ca430983f93095" title="This function frees memory allocated by the MQTT C client library, especially the topic name.">MQTTClient_free()</a> library function. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>The address of a pointer to the <a class="el" href="structMQTTClient__message.html" title="A structure representing the payload and attributes of an MQTT message.">MQTTClient_message</a> structure to be freed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2a617c6b0492c04a4ddea592f5e53604"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a617c6b0492c04a4ddea592f5e53604">&#9670;&nbsp;</a></span>MQTTClient_getPendingDeliveryTokens()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_getPendingDeliveryTokens </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_deliveryToken **&#160;</td>
          <td class="paramname"><em>tokens</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets a pointer to an array of delivery tokens for messages that are currently in-flight (pending completion). </p>
<p><b>Important note:</b> The memory used to hold the array of tokens is malloc()'d in this function. The client application is responsible for freeing this memory when it is no longer required. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">tokens</td><td>The address of a pointer to an ::MQTTClient_deliveryToken. When the function returns successfully, the pointer is set to point to an array of tokens representing messages pending completion. The last member of the array is set to -1 to indicate there are no more tokens. If no tokens are pending, the pointer is set to NULL. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the function returns successfully. An error code is returned if there was a problem obtaining the list of pending tokens. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph.png" border="0" usemap="#aMQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph" id="aMQTTClient_8c_a2a617c6b0492c04a4ddea592f5e53604_cgraph">
<area shape="rect" title="This function sets a pointer to an array of delivery tokens for messages that are currently in&#45;flight..." alt="" coords="5,5,216,47"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="264,13,432,39"/>
</map>
</div>

</div>
</div>
<a id="abe842456c914ce9201d277a972cc085e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe842456c914ce9201d277a972cc085e">&#9670;&nbsp;</a></span>MQTTClient_getVersionInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structMQTTClient__nameValue.html">MQTTClient_nameValue</a>* MQTTClient_getVersionInfo </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function returns version information about the library. </p>
<p>no trace information will be returned. </p><dl class="section return"><dt>Returns</dt><dd>an array of strings describing the library. The last entry is a NULL pointer. </dd></dl>

</div>
</div>
<a id="a21804ede1a506d1d69a472bc30acc8ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21804ede1a506d1d69a472bc30acc8ba">&#9670;&nbsp;</a></span>MQTTClient_global_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MQTTClient_global_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structMQTTClient__init__options.html">MQTTClient_init_options</a> *&#160;</td>
          <td class="paramname"><em>inits</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Global init of mqtt library. </p>
<p>Call once on program start to set global behaviour. do_openssl_init - if mqtt library should initialize OpenSSL (1) or rely on the caller to do it before using the library (0) </p>

</div>
</div>
<a id="a6e8231e8c47f6f67f7ebbb5dcb4c69c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">&#9670;&nbsp;</a></span>MQTTClient_isConnected()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_isConnected </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function allows the client application to test whether or not a client is currently connected to the MQTT server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Boolean true if the client is connected, otherwise false. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph.png" border="0" usemap="#aMQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph" id="aMQTTClient_8c_a6e8231e8c47f6f67f7ebbb5dcb4c69c0_cgraph">
<area shape="rect" title="This function allows the client application to test whether or not a client is currently connected to..." alt="" coords="5,5,176,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="224,5,392,32"/>
</map>
</div>

</div>
</div>
<a id="a9a6a07529e252574db1f95d40ccc0784"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a6a07529e252574db1f95d40ccc0784">&#9670;&nbsp;</a></span>MQTTClient_malloc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* MQTTClient_malloc </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to allocate memory to be used or freed by the MQTT C client library, especially the data in user persistence. </p>
<p>This is needed on Windows when the client library and application program have been compiled with different versions of the C compiler. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>The size of the memory to be allocated. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3cd7a94b48d1d9c6b8af4b9203d69d37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cd7a94b48d1d9c6b8af4b9203d69d37">&#9670;&nbsp;</a></span>MQTTClient_publish()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_publish </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>topicName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>payloadlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>payload</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>retained</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_deliveryToken *&#160;</td>
          <td class="paramname"><em>dt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to publish a message to a given topic (see also <a class="el" href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3" title="This function attempts to publish a message to a given topic (see also MQTTClient_publish()).">MQTTClient_publishMessage()</a>). </p>
<p>An ::MQTTClient_deliveryToken is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see async, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion</a> and MQTTClient_deliveryComplete()). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
    <tr><td class="paramname">payloadlen</td><td>The length of the payload in bytes. </td></tr>
    <tr><td class="paramname">payload</td><td>A pointer to the byte array payload of the message. </td></tr>
    <tr><td class="paramname">qos</td><td>The qos of the message. </td></tr>
    <tr><td class="paramname">retained</td><td>The retained flag for the message. </td></tr>
    <tr><td class="paramname">dt</td><td>A pointer to an ::MQTTClient_deliveryToken. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the message is accepted for publication. An error code is returned if there was a problem accepting the message. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph.png" border="0" usemap="#aMQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph" id="aMQTTClient_8c_a3cd7a94b48d1d9c6b8af4b9203d69d37_cgraph">
<area shape="rect" title="This function attempts to publish a message to a given topic (see also MQTTClient_publishMessage())." alt="" coords="5,5,145,32"/>
<area shape="rect" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes..." alt="" coords="193,5,340,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="388,5,556,32"/>
</map>
</div>

</div>
</div>
<a id="a3c0ca97b393eee10d4f441ba68830e83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c0ca97b393eee10d4f441ba68830e83">&#9670;&nbsp;</a></span>MQTTClient_publish5()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_publish5 </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>topicName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>payloadlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>payload</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>retained</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
          <td class="paramname"><em>properties</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_deliveryToken *&#160;</td>
          <td class="paramname"><em>dt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Attempts to publish a message to a given topic using MQTT version 5.0 (see also <a class="el" href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461" title="Attempts to publish a message to the given topic using MQTT version 5.0 (see also MQTTClient_publish5...">MQTTClient_publishMessage5()</a>). </p>
<p>An ::MQTTClient_deliveryToken is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see async, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion</a> and MQTTClient_deliveryComplete()). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
    <tr><td class="paramname">payloadlen</td><td>The length of the payload in bytes. </td></tr>
    <tr><td class="paramname">payload</td><td>A pointer to the byte array payload of the message. </td></tr>
    <tr><td class="paramname">qos</td><td>The qos of the message. </td></tr>
    <tr><td class="paramname">retained</td><td>The retained flag for the message. </td></tr>
    <tr><td class="paramname">properties</td><td>the MQTT 5.0 properties to be used </td></tr>
    <tr><td class="paramname">dt</td><td>A pointer to an ::MQTTClient_deliveryToken. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph.png" border="0" usemap="#aMQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph" id="aMQTTClient_8c_a3c0ca97b393eee10d4f441ba68830e83_cgraph">
<area shape="rect" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes..." alt="" coords="5,5,152,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="200,5,368,32"/>
</map>
</div>

</div>
</div>
<a id="a5e0cfa14237d7557bee2a59747ecadd3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e0cfa14237d7557bee2a59747ecadd3">&#9670;&nbsp;</a></span>MQTTClient_publishMessage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_publishMessage </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>topicName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_deliveryToken *&#160;</td>
          <td class="paramname"><em>dt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to publish a message to a given topic (see also <a class="el" href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37" title="This function attempts to publish a message to a given topic (see also MQTTClient_publishMessage()).">MQTTClient_publish()</a>). </p>
<p>An ::MQTTClient_deliveryToken is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see async, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion</a> and MQTTClient_deliveryComplete()). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
    <tr><td class="paramname">msg</td><td>A pointer to a valid <a class="el" href="structMQTTClient__message.html" title="A structure representing the payload and attributes of an MQTT message.">MQTTClient_message</a> structure containing the payload and attributes of the message to be published. </td></tr>
    <tr><td class="paramname">dt</td><td>A pointer to an ::MQTTClient_deliveryToken. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the message is accepted for publication. An error code is returned if there was a problem accepting the message. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph.png" border="0" usemap="#aMQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph" id="aMQTTClient_8c_a5e0cfa14237d7557bee2a59747ecadd3_cgraph">
<area shape="rect" title="This function attempts to publish a message to a given topic (see also MQTTClient_publish())." alt="" coords="5,5,199,32"/>
<area shape="rect" href="MQTTClient_8c.html#ae54936bf7680dcde353e6fc785a44461" title="Attempts to publish a message to the given topic using MQTT version 5.0 (see also MQTTClient_publish5..." alt="" coords="247,5,447,32"/>
<area shape="rect" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes..." alt="" coords="495,5,641,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="689,5,857,32"/>
</map>
</div>

</div>
</div>
<a id="ae54936bf7680dcde353e6fc785a44461"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae54936bf7680dcde353e6fc785a44461">&#9670;&nbsp;</a></span>MQTTClient_publishMessage5()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_publishMessage5 </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>topicName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_deliveryToken *&#160;</td>
          <td class="paramname"><em>dt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Attempts to publish a message to the given topic using MQTT version 5.0 (see also <a class="el" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes...">MQTTClient_publish5()</a>). </p>
<p>An ::MQTTClient_deliveryToken is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see async, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion</a> and MQTTClient_deliveryComplete()). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">topicName</td><td>The topic associated with this message. </td></tr>
    <tr><td class="paramname">msg</td><td>A pointer to a valid <a class="el" href="structMQTTClient__message.html" title="A structure representing the payload and attributes of an MQTT message.">MQTTClient_message</a> structure containing the payload and attributes of the message to be published. </td></tr>
    <tr><td class="paramname">dt</td><td>A pointer to an ::MQTTClient_deliveryToken. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph.png" border="0" usemap="#aMQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph" id="aMQTTClient_8c_ae54936bf7680dcde353e6fc785a44461_cgraph">
<area shape="rect" title="Attempts to publish a message to the given topic using MQTT version 5.0 (see also MQTTClient_publish5..." alt="" coords="5,5,205,32"/>
<area shape="rect" href="MQTTClient_8c.html#a3c0ca97b393eee10d4f441ba68830e83" title="Attempts to publish a message to a given topic using MQTT version 5.0 (see also MQTTClient_publishMes..." alt="" coords="253,5,400,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="448,5,616,32"/>
</map>
</div>

</div>
</div>
<a id="a4c2df88d00a3dadd510a8cb774739366"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c2df88d00a3dadd510a8cb774739366">&#9670;&nbsp;</a></span>MQTTClient_receive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_receive </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>topicName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>topicLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTClient__message.html">MQTTClient_message</a> **&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function performs a synchronous receive of incoming messages. </p>
<p>It should be used only when the client application has not set callback methods to support asynchronous receipt of messages (see async and <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a>). Using this function allows a single-threaded client subscriber application to be written. When called, this function blocks until the next message arrives or the specified timeout expires (see also <a class="el" href="MQTTClient_8c.html#a8ad3d29864a9ca08202b0832e0f6678e" title="When implementing a single-threaded client, call this function periodically to allow processing of me...">MQTTClient_yield()</a>).</p>
<p><b>Important note:</b> The application must free() the memory allocated to the topic and the message when processing is complete (see <a class="el" href="MQTTClient_8c.html#a2bc00ce11e0cac5dbc0938c512b4ab31" title="This function frees memory allocated to an MQTT message, including the additional memory allocated to...">MQTTClient_freeMessage()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">topicName</td><td>The address of a pointer to a topic. This function allocates the memory for the topic and returns it to the application by setting <em>topicName</em> to point to the topic. </td></tr>
    <tr><td class="paramname">topicLen</td><td>The length of the topic. If the return code from this function is ::MQTTCLIENT_TOPICNAME_TRUNCATED, the topic contains embedded NULL characters and the full topic should be retrieved by using <em>topicLen</em>. </td></tr>
    <tr><td class="paramname">message</td><td>The address of a pointer to the received message. This function allocates the memory for the message and returns it to the application by setting <em>message</em> to point to the received message. The pointer is set to NULL if the timeout expires. </td></tr>
    <tr><td class="paramname">timeout</td><td>The length of time to wait for a message in milliseconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS or ::MQTTCLIENT_TOPICNAME_TRUNCATED if a message is received. ::MQTTCLIENT_SUCCESS can also indicate that the timeout expired, in which case <em>message</em> is NULL. An error code is returned if there was a problem trying to receive a message. </dd></dl>

</div>
</div>
<a id="aad27d07782991a4937ebf2f39a021f83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad27d07782991a4937ebf2f39a021f83">&#9670;&nbsp;</a></span>MQTTClient_setCallbacks()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_setCallbacks </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_connectionLost *&#160;</td>
          <td class="paramname"><em>cl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_messageArrived *&#160;</td>
          <td class="paramname"><em>ma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_deliveryComplete *&#160;</td>
          <td class="paramname"><em>dc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets the callback functions for a specific client. </p>
<p>If your client application doesn't use a particular callback, set the relevant parameter to NULL. Calling <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a> puts the client into multi-threaded mode. Any necessary message acknowledgements and status communications are handled in the background without any intervention from the client application. See async for more information.</p>
<p><b>Note:</b> The MQTT client must be disconnected when this function is called. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">context</td><td>A pointer to any application-specific context. The the <em>context</em> pointer is passed to each of the callback functions to provide access to the context information in the callback. </td></tr>
    <tr><td class="paramname">cl</td><td>A pointer to an MQTTClient_connectionLost() callback function. You can set this to NULL if your application doesn't handle disconnections. </td></tr>
    <tr><td class="paramname">ma</td><td>A pointer to an MQTTClient_messageArrived() callback function. This callback function must be set when you call <a class="el" href="MQTTClient_8c.html#aad27d07782991a4937ebf2f39a021f83" title="This function sets the callback functions for a specific client.">MQTTClient_setCallbacks()</a>, as otherwise there would be nowhere to deliver any incoming messages. </td></tr>
    <tr><td class="paramname">dc</td><td>A pointer to an MQTTClient_deliveryComplete() callback function. You can set this to NULL if your application publishes synchronously or if you do not want to check for successful delivery. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the callbacks were correctly set, ::MQTTCLIENT_FAILURE if an error occurred. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph.png" border="0" usemap="#aMQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph" id="aMQTTClient_8c_aad27d07782991a4937ebf2f39a021f83_cgraph">
<area shape="rect" title="This function sets the callback functions for a specific client." alt="" coords="5,5,180,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="228,5,396,32"/>
</map>
</div>

</div>
</div>
<a id="a96067a2fb74d2a61c7e93015629548e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96067a2fb74d2a61c7e93015629548e0">&#9670;&nbsp;</a></span>MQTTClient_setCommandTimeout()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_setCommandTimeout </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>milliSeconds</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the timeout value for un/subscribe commands when waiting for the un/suback response from the server. </p>
<p>Values less than 5000 are not allowed. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">milliSeconds</td><td>the maximum number of milliseconds to wait </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>MQTTCLIENT_SUCCESS or MQTTCLIENT_FAILURE </dd></dl>

</div>
</div>
<a id="adc7d708419664670063a0e7fd9c27bca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc7d708419664670063a0e7fd9c27bca">&#9670;&nbsp;</a></span>MQTTClient_setDisconnected()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_setDisconnected </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_disconnected *&#160;</td>
          <td class="paramname"><em>co</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the MQTTClient_disconnected() callback function for a client. </p>
<p>This will be called if a disconnect packet is received from the server. Only valid for MQTT V5 and above. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">context</td><td>A pointer to any application-specific context. The the <em>context</em> pointer is passed to each of the callback functions to provide access to the context information in the callback. </td></tr>
    <tr><td class="paramname">co</td><td>A pointer to an MQTTClient_disconnected() callback function. NULL removes the callback setting. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the callbacks were correctly set, ::MQTTCLIENT_FAILURE if an error occurred. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph.png" border="0" usemap="#aMQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph" id="aMQTTClient_8c_adc7d708419664670063a0e7fd9c27bca_cgraph">
<area shape="rect" title="Sets the MQTTClient_disconnected() callback function for a client." alt="" coords="5,5,201,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="249,5,417,32"/>
</map>
</div>

</div>
</div>
<a id="a22870f94aa4cb1827626612f1ded7c69"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22870f94aa4cb1827626612f1ded7c69">&#9670;&nbsp;</a></span>MQTTClient_setTraceCallback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MQTTClient_setTraceCallback </td>
          <td>(</td>
          <td class="paramtype">MQTTClient_traceCallback *&#160;</td>
          <td class="paramname"><em>callback</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets the trace callback if needed. </p>
<p>If set to NULL, no trace information will be returned. The default trace level is MQTTASYNC_TRACE_MINIMUM. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">callback</td><td>a pointer to the function which will handle the trace information </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4dfa35d29db54b10b15b8ac2d9a778be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4dfa35d29db54b10b15b8ac2d9a778be">&#9670;&nbsp;</a></span>MQTTClient_setTraceLevel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MQTTClient_setTraceLevel </td>
          <td>(</td>
          <td class="paramtype">enum MQTTCLIENT_TRACE_LEVELS&#160;</td>
          <td class="paramname"><em>level</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets the level of trace information which will be returned in the trace callback. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">level</td><td>the trace level required </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9defda2979f6fedaae64fd85f5c2f617"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9defda2979f6fedaae64fd85f5c2f617">&#9670;&nbsp;</a></span>MQTTClient_strerror()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* MQTTClient_strerror </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>code</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a pointer to the string representation of the error or NULL. </p>
<p>Do not free after use. Returns NULL if the error code is unknown. </p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph.png" border="0" usemap="#aMQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph" id="aMQTTClient_8c_a9defda2979f6fedaae64fd85f5c2f617_cgraph">
<area shape="rect" title="Returns a pointer to the string representation of the error or NULL." alt="" coords="5,5,145,32"/>
<area shape="rect" href="Log_8c.html#a669722e3f57811871f97c12392aba85d" title="Log a message." alt="" coords="193,5,237,32"/>
</map>
</div>

</div>
</div>
<a id="a9c1c28258f0d5c6a44ff53a98618f5f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c1c28258f0d5c6a44ff53a98618f5f3">&#9670;&nbsp;</a></span>MQTTClient_subscribe()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_subscribe </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to subscribe a client to a single topic, which may contain wildcards (see wildcard). </p>
<p>This call also specifies the qos requested for the subscription (see also <a class="el" href="MQTTClient_8c.html#a92fa1c13f3db8399e042fbdbdfb692b3" title="This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wi...">MQTTClient_subscribeMany()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">topic</td><td>The subscription topic, which may include wildcards. </td></tr>
    <tr><td class="paramname">qos</td><td>The requested quality of service for the subscription. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the subscription request is successful. An error code is returned if there was a problem registering the subscription. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph.png" border="0" usemap="#aMQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph" id="aMQTTClient_8c_a9c1c28258f0d5c6a44ff53a98618f5f3_cgraph">
<area shape="rect" title="This function attempts to subscribe a client to a single topic, which may contain wildcards (see wild..." alt="" coords="5,5,160,32"/>
<area shape="rect" href="MQTTClient_8c.html#af35ab7375435f7b6388c5ff4610dad3d" title="This function attempts to subscribe an MQTT version 5.0 client to a single topic, which may contain w..." alt="" coords="208,5,371,32"/>
<area shape="rect" href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c" title="This function attempts to subscribe an MQTT version 5.0 client to a list of topics,..." alt="" coords="419,5,612,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="660,5,828,32"/>
</map>
</div>

</div>
</div>
<a id="af35ab7375435f7b6388c5ff4610dad3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af35ab7375435f7b6388c5ff4610dad3d">&#9670;&nbsp;</a></span>MQTTClient_subscribe5()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_subscribe5 </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
          <td class="paramname"><em>props</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to subscribe an MQTT version 5.0 client to a single topic, which may contain wildcards (see wildcard). </p>
<p>This call also specifies the qos requested for the subscription (see also <a class="el" href="MQTTClient_8c.html#a92fa1c13f3db8399e042fbdbdfb692b3" title="This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wi...">MQTTClient_subscribeMany()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">topic</td><td>The subscription topic, which may include wildcards. </td></tr>
    <tr><td class="paramname">qos</td><td>The requested quality of service for the subscription. </td></tr>
    <tr><td class="paramname">opts</td><td>the MQTT 5.0 subscribe options to be used </td></tr>
    <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph.png" border="0" usemap="#aMQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph" id="aMQTTClient_8c_af35ab7375435f7b6388c5ff4610dad3d_cgraph">
<area shape="rect" title="This function attempts to subscribe an MQTT version 5.0 client to a single topic, which may contain w..." alt="" coords="5,5,168,32"/>
<area shape="rect" href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c" title="This function attempts to subscribe an MQTT version 5.0 client to a list of topics,..." alt="" coords="216,5,409,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="457,5,625,32"/>
</map>
</div>

</div>
</div>
<a id="a92fa1c13f3db8399e042fbdbdfb692b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92fa1c13f3db8399e042fbdbdfb692b3">&#9670;&nbsp;</a></span>MQTTClient_subscribeMany()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_subscribeMany </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *const *&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>qos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wildcard). </p>
<p>This call also specifies the qos requested for each topic (see also <a class="el" href="MQTTClient_8c.html#a9c1c28258f0d5c6a44ff53a98618f5f3" title="This function attempts to subscribe a client to a single topic, which may contain wildcards (see wild...">MQTTClient_subscribe()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">count</td><td>The number of topics for which the client is requesting subscriptions. </td></tr>
    <tr><td class="paramname">topic</td><td>An array (of length <em>count</em>) of pointers to topics, each of which may include wildcards. </td></tr>
    <tr><td class="paramname">qos</td><td>An array (of length <em>count</em>) of qos values. qos[n] is the requested QoS for topic[n]. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the subscription request is successful. An error code is returned if there was a problem registering the subscriptions. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph.png" border="0" usemap="#aMQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph" id="aMQTTClient_8c_a92fa1c13f3db8399e042fbdbdfb692b3_cgraph">
<area shape="rect" title="This function attempts to subscribe a client to a list of topics, which may contain wildcards (see wi..." alt="" coords="5,5,192,32"/>
<area shape="rect" href="MQTTClient_8c.html#a5390c2402f135c12826ffbf6fc261f7c" title="This function attempts to subscribe an MQTT version 5.0 client to a list of topics,..." alt="" coords="240,5,433,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="481,5,649,32"/>
</map>
</div>

</div>
</div>
<a id="a5390c2402f135c12826ffbf6fc261f7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5390c2402f135c12826ffbf6fc261f7c">&#9670;&nbsp;</a></span>MQTTClient_subscribeMany5()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_subscribeMany5 </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *const *&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>qos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTSubscribe__options.html">MQTTSubscribe_options</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
          <td class="paramname"><em>props</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to subscribe an MQTT version 5.0 client to a list of topics, which may contain wildcards (see wildcard). </p>
<p>This call also specifies the qos requested for each topic (see also <a class="el" href="MQTTClient_8c.html#a9c1c28258f0d5c6a44ff53a98618f5f3" title="This function attempts to subscribe a client to a single topic, which may contain wildcards (see wild...">MQTTClient_subscribe()</a>). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">count</td><td>The number of topics for which the client is requesting subscriptions. </td></tr>
    <tr><td class="paramname">topic</td><td>An array (of length <em>count</em>) of pointers to topics, each of which may include wildcards. </td></tr>
    <tr><td class="paramname">qos</td><td>An array (of length <em>count</em>) of qos values. qos[n] is the requested QoS for topic[n]. </td></tr>
    <tr><td class="paramname">opts</td><td>the MQTT 5.0 subscribe options to be used </td></tr>
    <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph.png" border="0" usemap="#aMQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph" id="aMQTTClient_8c_a5390c2402f135c12826ffbf6fc261f7c_cgraph">
<area shape="rect" title="This function attempts to subscribe an MQTT version 5.0 client to a list of topics,..." alt="" coords="5,5,199,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="247,5,415,32"/>
</map>
</div>

</div>
</div>
<a id="aa8731be3dbc6a25f41f037f8bbbb054b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8731be3dbc6a25f41f037f8bbbb054b">&#9670;&nbsp;</a></span>MQTTClient_unsubscribe()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_unsubscribe </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>topic</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to remove an existing subscription made by the specified client. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">topic</td><td>The topic for the subscription to be removed, which may include wildcards (see wildcard). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the subscription is removed. An error code is returned if there was a problem removing the subscription. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph.png" border="0" usemap="#aMQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph" id="aMQTTClient_8c_aa8731be3dbc6a25f41f037f8bbbb054b_cgraph">
<area shape="rect" title="This function attempts to remove an existing subscription made by the specified client." alt="" coords="5,5,175,32"/>
<area shape="rect" href="MQTTClient_8c.html#a58356c13867f18df60fd4c7ec9457c48" title="This function attempts to remove an existing subscription made by the specified client using MQTT 5...." alt="" coords="223,5,399,32"/>
<area shape="rect" href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="447,5,653,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="701,5,869,32"/>
</map>
</div>

</div>
</div>
<a id="a58356c13867f18df60fd4c7ec9457c48"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58356c13867f18df60fd4c7ec9457c48">&#9670;&nbsp;</a></span>MQTTClient_unsubscribe5()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_unsubscribe5 </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
          <td class="paramname"><em>props</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to remove an existing subscription made by the specified client using MQTT 5.0. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">topic</td><td>The topic for the subscription to be removed, which may include wildcards (see wildcard). </td></tr>
    <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph.png" border="0" usemap="#aMQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph" id="aMQTTClient_8c_a58356c13867f18df60fd4c7ec9457c48_cgraph">
<area shape="rect" title="This function attempts to remove an existing subscription made by the specified client using MQTT 5...." alt="" coords="5,5,181,32"/>
<area shape="rect" href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="229,5,436,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="484,5,652,32"/>
</map>
</div>

</div>
</div>
<a id="a50abbce720d50b9f84b97ff9fa1f546d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50abbce720d50b9f84b97ff9fa1f546d">&#9670;&nbsp;</a></span>MQTTClient_unsubscribeMany()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_unsubscribeMany </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *const *&#160;</td>
          <td class="paramname"><em>topic</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to remove existing subscriptions to a list of topics made by the specified client. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">count</td><td>The number subscriptions to be removed. </td></tr>
    <tr><td class="paramname">topic</td><td>An array (of length <em>count</em>) of pointers to the topics of the subscriptions to be removed, each of which may include wildcards. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the subscriptions are removed. An error code is returned if there was a problem removing the subscriptions. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph.png" border="0" usemap="#aMQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph" id="aMQTTClient_8c_a50abbce720d50b9f84b97ff9fa1f546d_cgraph">
<area shape="rect" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="5,5,205,32"/>
<area shape="rect" href="MQTTClient_8c.html#a46bdb532d2153110ccffb2f0748d1ba5" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="253,5,460,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="508,5,676,32"/>
</map>
</div>

</div>
</div>
<a id="a46bdb532d2153110ccffb2f0748d1ba5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46bdb532d2153110ccffb2f0748d1ba5">&#9670;&nbsp;</a></span>MQTTClient_unsubscribeMany5()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structMQTTResponse.html">MQTTResponse</a> MQTTClient_unsubscribeMany5 </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *const *&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structMQTTProperties.html">MQTTProperties</a> *&#160;</td>
          <td class="paramname"><em>props</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function attempts to remove existing subscriptions to a list of topics made by the specified client using MQTT version 5.0. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">count</td><td>The number subscriptions to be removed. </td></tr>
    <tr><td class="paramname">topic</td><td>An array (of length <em>count</em>) of pointers to the topics of the subscriptions to be removed, each of which may include wildcards. </td></tr>
    <tr><td class="paramname">props</td><td>the MQTT 5.0 properties to be used </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the MQTT 5.0 response information: error codes and properties. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph.png" border="0" usemap="#aMQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph" id="aMQTTClient_8c_a46bdb532d2153110ccffb2f0748d1ba5_cgraph">
<area shape="rect" title="This function attempts to remove existing subscriptions to a list of topics made by the specified cli..." alt="" coords="5,5,212,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="260,5,428,32"/>
</map>
</div>

</div>
</div>
<a id="ab8786efdd6c3a50c6ca33cfb5d8fc283"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8786efdd6c3a50c6ca33cfb5d8fc283">&#9670;&nbsp;</a></span>MQTTClient_waitForCompletion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTClient_waitForCompletion </td>
          <td>(</td>
          <td class="paramtype">MQTTClient&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MQTTClient_deliveryToken&#160;</td>
          <td class="paramname"><em>dt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is called by the client application to synchronize execution of the main thread with completed publication of a message. </p>
<p>When called, <a class="el" href="MQTTClient_8c.html#ab8786efdd6c3a50c6ca33cfb5d8fc283" title="This function is called by the client application to synchronize execution of the main thread with co...">MQTTClient_waitForCompletion()</a> blocks execution until the message has been successful delivered or the specified timeout has expired. See async. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A valid client handle from a successful call to <a class="el" href="MQTTClient_8c.html#a9a0518d9ca924d12c1329dbe3de5f2b6" title="This function creates an MQTT client ready for connection to the specified server and using the speci...">MQTTClient_create()</a>. </td></tr>
    <tr><td class="paramname">dt</td><td>The ::MQTTClient_deliveryToken that represents the message being tested for successful delivery. Delivery tokens are issued by the publishing functions <a class="el" href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37" title="This function attempts to publish a message to a given topic (see also MQTTClient_publishMessage()).">MQTTClient_publish()</a> and <a class="el" href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3" title="This function attempts to publish a message to a given topic (see also MQTTClient_publish()).">MQTTClient_publishMessage()</a>. </td></tr>
    <tr><td class="paramname">timeout</td><td>The maximum time to wait in milliseconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>::MQTTCLIENT_SUCCESS if the message was successfully delivered. An error code is returned if the timeout expires or there was a problem checking the token. </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph.png" border="0" usemap="#aMQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph" id="aMQTTClient_8c_ab8786efdd6c3a50c6ca33cfb5d8fc283_cgraph">
<area shape="rect" title="This function is called by the client application to synchronize execution of the main thread with co..." alt="" coords="5,5,212,32"/>
<area shape="rect" href="Thread_8c.html#a1c9cd0a1556e72719a5ed3f9cdf6686f" title="Lock a mutex which has alrea." alt="" coords="260,5,428,32"/>
</map>
</div>

</div>
</div>
<a id="a8ad3d29864a9ca08202b0832e0f6678e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ad3d29864a9ca08202b0832e0f6678e">&#9670;&nbsp;</a></span>MQTTClient_yield()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MQTTClient_yield </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>When implementing a single-threaded client, call this function periodically to allow processing of message retries and to send MQTT keepalive pings. </p>
<p>If the application is calling <a class="el" href="MQTTClient_8c.html#a4c2df88d00a3dadd510a8cb774739366" title="This function performs a synchronous receive of incoming messages.">MQTTClient_receive()</a> regularly, then it is not necessary to call this function. </p>

</div>
</div>
<a id="acdcf1aefca1dbb3d1b3d36c9bbaf3760"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acdcf1aefca1dbb3d1b3d36c9bbaf3760">&#9670;&nbsp;</a></span>MQTTProtocol_checkPendingWrites()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void MQTTProtocol_checkPendingWrites </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>See if any pending writes have been completed, and cleanup if so. </p>
<p>Cleaning up means removing any publication data that was stored because the write did not originally complete. </p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="MQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph.png" border="0" usemap="#aMQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph" alt=""/></div>
<map name="aMQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph" id="aMQTTClient_8c_acdcf1aefca1dbb3d1b3d36c9bbaf3760_cgraph">
<area shape="rect" title="See if any pending writes have been completed, and cleanup if so." alt="" coords="5,61,201,102"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="931,17,1049,44"/>
<area shape="rect" href="LinkedList_8c.html#a8430370b2b15c56ec95bb8e7e36753a5" title="Removes and frees an item in a list by comparing the pointer to the content." alt="" coords="519,43,611,69"/>
<area shape="rect" href="MQTTProtocolClient_8c.html#a900fa28a8774ad6f5535104bb62e7abf" title="Remove stored message data." alt="" coords="249,93,471,120"/>
<area shape="rect" href="Socket_8c.html#a457d9a6a9d8e886c46fcd0c096f45614" title="Indicate whether any data is pending outbound for a socket." alt="" coords="276,144,444,171"/>
<area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="659,43,740,69"/>
<area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="788,43,883,69"/>
<area shape="rect" href="LinkedList_8c.html#a1738915a6d6f10022e9ee1481c0ae452" title="List callback function for comparing integers." alt="" coords="521,144,608,171"/>
</map>
</div>

</div>
</div>
<a id="a01bd2c5f98ec5c0636a106db33f2b01b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01bd2c5f98ec5c0636a106db33f2b01b">&#9670;&nbsp;</a></span>MQTTResponse_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MQTTResponse_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structMQTTResponse.html">MQTTResponse</a>&#160;</td>
          <td class="paramname"><em>response</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Frees the storage associated with the MQTT response. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">response</td><td>the response structure to be freed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a7de1b785bccb15bfa46dcf3a6706aad0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7de1b785bccb15bfa46dcf3a6706aad0">&#9670;&nbsp;</a></span>ClientState</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structClientStates.html">ClientStates</a> ClientState</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">{</div>
<div class="line">        CLIENT_VERSION, </div>
<div class="line">        NULL </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Oct 13 2023 18:02:53 for MQTT C Client Libraries Internals by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
